<?php
/** require:
 *  __PHY_LIB
 */
require_once(__PHY_LIB . "/class/Item.class.php");

class Experience extends Item {
/// definition and constructor ///
	function Experience($id=0, $field="") {
		Query::Query();
		$this->cfgKeyField("id");
		$this->cfgAllField("id,nation,category,target,title,description,date_added");
		$this->cfgTable("unit_experience");
		if ("" == $field || "*" == $field) {
			$this->cfgField($this->mAllField);
		}
		else {
			$this->cfgField($field);
		}
		if (0 < $id) {
			$this->cfgWhere($this->mKeyField . "=" . $id);
			$this->load();
		}
		else {
			$this->set($this->mKeyField, $id);
		}
	}

	function invalid() {
		return false;
	}

} /// end class Experience.

class ExperienceList extends ItemList {
	/// definition and constructor ///
	function ExperienceList($tablename=null) {
		ItemList::ItemList();
		$this->cfgClass("Experience");
		$this->cfgKeyField("id");
		$this->cfgAllField("id,nation,category,target,title,description,date_added");
		$this->cfgTable(null == $tablename ? "unit_experience" : $tablename);
	}

} /// end class ExperienceList.
?>
